letabli.org;
root /home/www/data/cyclo-letabli/www;
+rewrite /wp-admin$ $scheme://$host$uri/ permanent;
+ # Add trailing slash to */wp-admin requests.
+location = /wp-admin/ {
+ return 301 /wp-admin/index.php?$args;
+ }
location / {
index index.html index.htm index.php;
+ try_files $uri $uri/ /index.php?$args;
}
location ~* ^.+\.(css|gif|html|ico|jpeg|js|jpg|png|txt|xml)$ {
access_log off;
fastcgi_pass_header Cookie;
fastcgi_pass_header Set-Cookie;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
+ if (!-f $document_root$fastcgi_script_name) {
+ # This is a robust solution for path info security issue and works with "cgi.fix_pathinfo = 1" in /etc/php.ini (default)
+ return 404;
+ }
fastcgi_pass unix:/run/php5/fpm/letabli;
}